package com.mm.controller;

import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import javax.sql.DataSource;

/**
 * @author XiaoLuo
 * @ClassName: JdbcConfig
 * @Description: ${todo}
 * @date 2019/4/4 20:50
 */
/*@Configuration
@EnableConfigurationProperties(JdbcProperties.class)
public class JdbcConfig {


	@Bean
	public DataSource dataSource(JdbcProperties jdbcProperties){
		DruidDataSource dataSource = new DruidDataSource();
		dataSource.setUrl(jdbcProperties.getUrl());
		dataSource.setPassword(jdbcProperties.getPassword());
		dataSource.setUsername(jdbcProperties.getUsername());
		dataSource.setDriverClassName(jdbcProperties.getDriverClassName());
		return dataSource;
	}

}*/
